#include "UserInteractionGateDeviceController.h"
#include "Arduino.h"
UserInteractionGateDeviceController::UserInteractionGateDeviceController(IDoorHAL *HAL)
{
    this->HAL = HAL;
	status = OPEN; //default
}


void UserInteractionGateDeviceController::lock()
{
    HAL->lockDoor();
}

void UserInteractionGateDeviceController::unlock()
{
    HAL->unlockDoor();
}

void UserInteractionGateDeviceController::onDoorClosed()
{
	Serial.print("CLOSED");
	status = CLOSED;
}

void UserInteractionGateDeviceController::onDoorOpened()
{
	Serial.print("OPEN");
	status = OPEN;
}